package model.commands.environment;

import model.Environment;
import model.SyntaxErrorException;
import model.commands.Command;

/**
 * Name:
 * SETPENDESIGN design_name
 * SETPD design_name
 * 
 * Description:
 * sets design of the pen to that represented by design_name
 *
 * @author Angelica Schwartz
 */
public class SetPenDesignCommand extends Command {    
    private String myPenDesign;
    
    /**
     * 
     * @param design a pen design
     */
    public SetPenDesignCommand(String design) {
        myPenDesign = design;
    }
    
    @Override
    public int evaluate (Environment e) throws SyntaxErrorException {
        e.invokeCommandableMethod(Environment.SET_PEN_DESIGN, myPenDesign);
        return 1;
    }

}
